package com.atguigu.spzx.model.common;

import lombok.Getter;

/**
 * title:
 * author: zgl
 * date: 2023/12/26
 * description：
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS(200, "success"),
    FAIL(-1, "未知错误"),
    Login_USERNAME_ERROR(101, "账号错误"),
    Login_PASSWORD_ERROR(102, "密码错误"),
    CODE_ERROR(103, "验证码错误"),
    LOGIN_PARAM_ERROR(104, "登录参数错误"),
    USER_NOT_LOGIN(105, "用户未登录"),
    FILE_UPLOAD_ERROR(106,"上传文件失败"),
    FILE_DELETE_ERROR(107,"删除文件失败"),
    EXCEL_DOWNLOAD_ERROR(108,"下载excel失败"),
    EXCEL_UPLOAD_ERROR(109,"上传excel失败"),
    HAS_CHILDREN_ERROR(110,"存在级联菜单"),
    PHONE_NUM_ERROR(111,"手机号格式错误"),
    SEND_MESSAGE_FAIL(112,"发送短信失败"),
    SEND_MESSAGE_LIMIT_ERROR(113,"手机号获取验证码过于频繁"),
    SEND_MESSAGE_COUNT_ERROR(114,"手机号获取验证码超过三次"),
    COMMIT_PARAM_ERROR(115,"注册提交参数错误"),
    COMMIT_CODE_ERROR(116,"验证码错误"),
    PHONE_REGISTER_EXISTS(117,"手机号已占用"),
    LOGIN_STATUS_ERROR(118,"登录状态失效"),
    PRODUCT_PRICE_ERROR(119,"价格过期，请刷新页面"),
    PRODUCT_NUM_ERROR(119,"库存不足"),
    FEIGN_ERROR(120,"远程调用错误"),
    ORDER_RESUBMIT_ERROR(121,"请勿重复提交订单"),
    PAY_PAGE_ERROR(122,"跳转到支付页失败"),
    ;
    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
